home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 14 / CU Amiga Magazine's Super CD-ROM 14 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-09].iso / CUCD / Programming / Blitz2 / BlitzFaq / FaqLists / Stringword.txt < prev    next >
Encoding:
Text File  |  1996-09-05  |  304 b   |  24 lines

  1. Function$ getword{word,n}
  2.  if n>1 then
  3.   for t = 1 to n
  4.    sp = Instr(word," ")
  5.    if sp = 0 then
  6.     pop for
  7.     goto done
  8.    endif
  9.   next
  10.  else
  11.   fs = 1
  12.  endif
  13.  
  14.  sp + 1
  15.  
  16.  sp2 = Instr(word," ",sp)
  17.  if sp2 = 0 then goto done
  18.  
  19.  subword = Mid$(word,sp,sp2-sp-1)
  20.  
  21. done:
  22.  Function Return subword
  23. EndFunction
  24.